using Assets.Scripts.GDK;
using UnityEngine;

namespace Brick
{
	public class AddBonusGuide : BaseGuideLayer
	{
		public RectTransform arrow;

		public override void OnStart()
		{
			bindItemTouch();
			view.gameObject.SetActive(value: false);
			gdk_runTime.setTimeOut(delegate
			{
				view.gameObject.SetActive(value: true);
				showBtns();
			}, 1f);
		}

		private void showBtns()
		{
			Vector3 localPosition = arrow.localPosition;
			arrowMove(arrow, localPosition - new Vector3(50f, 0f, 0f), localPosition);
		}

		private void bindItemTouch()
		{
			GameObject gameObject = gdk_game_manager.loadPrefab(GuideID.ALERT);
			gameObject.GetComponent<GuideAlert>().OnData(5, delegate
			{
				UnityEngine.Object.Destroy(base.gameObject, 0.1f);
				if (callback != null)
				{
					callback();
				}
			});
			gameObject.transform.SetParent(box);
		}
	}
}

